# -*- coding: utf-8 -*-


from db.mysql import MysqlClient
from common.helper import Helper
from itertools import product
name = "如E国内旅游保"
prices = ["14.00","23.00","28.00","45.00",'60.00']
plan = {

    "days":["3d","5d","7d","15d","30d"],
    "people_count":["1"],
    "accident_death":['130000'],
    "accident_medical":["15000"],
    "burial_fee":['5000']
}
num = 0
mysql = MysqlClient()
for v in product(plan["days"],plan["people_count"],plan["accident_death"],plan["accident_medical"],plan["burial_fee"]):
    data = Helper.formatProductInfo( plan,v )
    data["price"] = prices[num]
    data["name"] = name
    data["company"] ="中国人寿"
    Helper.mergeTable( name,mysql,data )
    num += 1


